package com.a3dweijing.wetouch2.Activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.Button;

import com.a3dweijing.wetouch2.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class BuyVipActivity extends Activity
{
    public static final int BUYVIPACTIVITYCODE = 26;
    
    @BindView(R.id.submit)
    Button submit;
    
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_buy_vip);
        ButterKnife.bind(this);
        getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    }
    
    @Override
    public boolean onTouchEvent(MotionEvent event)
    {
        finish();
        return super.onTouchEvent(event);
    }
    
    public static void startActivity(Fragment fragment)
    {
        Intent intent = new Intent();
        intent.setClass(fragment.getActivity(), BuyVipActivity.class);
        fragment.startActivityForResult(intent, BUYVIPACTIVITYCODE);
    }
    
    @OnClick(R.id.submit)
    public void onViewClicked() {
        setResult(RESULT_OK);
        finish();
    }
}
